package com.cq.hd.order.api.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class MerchantOrderSheet implements Serializable {

    @ExcelProperty(value = "活动名称", index = 0)
    @ColumnWidth(20)
    @ApiModelProperty(value = "活动标题")
    private String activeTitle;

    @ExcelProperty(value = "订单号", index = 1)
    @ColumnWidth(20)
    @ApiModelProperty(value = "订单号")
    private String subOrderNo;

    @ExcelProperty(value = "商品名称", index = 2)
    @ColumnWidth(20)
    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ExcelProperty(value = "商品金额", index = 3)
    @ApiModelProperty(value = "商品金额")
    @ColumnWidth(20)
    @NumberFormat("#0.00")
    private BigDecimal goodsPrice;

    @ExcelProperty(value = "分账本金", index = 4)
    @ApiModelProperty(value = "本金")
    @ColumnWidth(20)
    @NumberFormat("#0.00")
    private BigDecimal merchantAmt;

    @ExcelProperty(value = "分账补贴", index = 5)
    @ApiModelProperty(value = "总补贴金额")
    @ColumnWidth(20)
    @NumberFormat("#0.00")
    private BigDecimal totalSubsidyAmt;

    @ExcelProperty(value = "核销时间", index = 6, converter = LocalDateTimeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "核销时间")
    private LocalDateTime verifyTime;

    @ExcelProperty(value = "用户昵称", index = 7)
    @ColumnWidth(20)
    @ApiModelProperty(value = "用户昵称")
    private String nickname;

    @ExcelProperty(value = "手机号", index = 8)
    @ColumnWidth(20)
    @ApiModelProperty(value = "用户手机号")
    private String userMobile;

    @ExcelProperty(value = "下单时间", index = 9, converter = LocalDateTimeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "下单时间")
    private LocalDateTime orderTime;

    @ExcelProperty(value = "支付时间", index = 10, converter = LocalDateTimeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @ExcelProperty(value = "订单结算时间", index = 11, converter = LocalDateTimeConverter.class)
    @ColumnWidth(20)
    @ApiModelProperty(value = "订单更新时间")
    private LocalDateTime updateTime;

    @ExcelProperty(value = "订单状态", index = 12)
    @ColumnWidth(20)
    @ApiModelProperty(value = "订单状态")
    private String subOrderStateText;

}
